package com.kujie.access.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 到期预警提示枚举
 *
 * @author check
 * @date 2025-07-17
 */
@Getter
@AllArgsConstructor
public enum LeaseExpirationWarnEnum {
    ALL("ALL", "0"),

    ZERO_TO_FIVE("0_TO_5_DAYS", "1"),

    FIVE_TO_TEN("5_TO_10_DAYS", "2"),

    TEN_TO_FIFTEEN("10_TO_15_DAYS", "3");

    private final String description;
    private final String code;

    public static String getByCode(String code) {
        for (LeaseExpirationWarnEnum value : LeaseExpirationWarnEnum.values()) {
            if (value.getCode().equals(code)) {
                return value.getDescription();
            }
        }
        return "";
    }
}
